package cn.farm.farm.Mapper.CommonMapper;

import cn.farm.farm.Entity.Common.DiseasestressSon;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface DiseaseMapper extends Mapper<DiseasestressSon> {
    @Select("select diseaseID,chineseName,latinName,alias,pathoImage from diseasestress where chineseName like CONCAT('%',#{name},'%')")
    @Results({
            @Result(column = "pathoImage" , property = "pathoimage",
                    many=@Many(select = "cn.farm.farm.Mapper.CommonMapper.MatchMapper.getimageID",fetchType= FetchType.EAGER))
    })
    List<DiseasestressSon> likeSelect(@Param(value = "name") String name);
}
